package com.hzqiuxm.tdddemo001.junit5demo.parameterized;

import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.ArgumentsProvider;

import java.util.stream.Stream;

/**
 * Copyright © 2021年 tdd-demo-001. All rights reserved.
 *
 * @author 临江仙 hzqiuxm@163.com
 * 自定义ArgumentsProvider
 * @date 2021/2/6 23:15
 */
public class MyArgumentsProvider implements ArgumentsProvider{

    @Override
    public Stream<? extends Arguments> provideArguments(ExtensionContext context) throws Exception {
        return Stream.of("临江仙","三台","倾杯").map(Arguments::of);
    }
}